This page last changed on Dec 03, 2007 by sewilco.

Configuring GeoServer

This document and the Data document should completely describe how to configure GeoServer. This is focused on the basics of the web administration tool, and then goes into configuring the options and metadata for the server. The 2 Data Configuration document focuses on adding your own data to GeoServer. Both documents assume you are working with the web administration tool, for information on working with files see the developer docs.

Overview

  • Go to http://localhost:8080/geoserver
  • Log-in (default user: admin, password: geoserver)
  • Configure Server, WMS and WFS. Be sure to hit 'submit'.
  • Preview changes with 'Apply', save them with 'Save'

Web Admin Tool Introduction

The main focus of GeoServer 1.2 was the web administration tool. It is built on STRUTS, and offers a complete graphical user interface, so that users need not ever touch configuration files. It additionally offers the ability to 'try out' new configurations before actually saving them. The work was driven by the excellent team at Refractions Research, with funding from the GeoConnections program. Notethat the web administration tool is in no way required to operate GeoServer, you are more than welcome to work directly with the configuration files. We discuss these at length in the Developer's section, see Config Files, but for the User docs we assume that you are working through the web admin tool. Some advanced users may need to access the files directly, we will discuss those situations in the user docs. In the future it may be possible to administer a remote GeoServer using a desktop client like uDig, as we designed for such a situation. The admin tool is meant to be as intuitive and self explanatory as possible, and much help is available from it directly. Most every operation and link has a tool tip that pops up on a mouse over (when you leave the mouse on top of it for over a second). It is also designed for Internationalization, and has been translated into French and Spanish. It should start up automatically in the language that the computer running GeoServer is set to. If you are interested in translating GeoServer into another language, please get in touch. See the translation section in How to Help for more information.

Accessing the Web Admin Tool

To access the web admin tool simply fire up your favorite browser and enter the following address:

http://localhost:8080/geoserver
You should see a page like:

The first time accessing this page will take a bit of time to load, as GeoServer needs to compile the pages of the application. This will only occur on the first access of the tool, and in future GeoServer versions we should be able to cut down that load time substantially (this is also the only place the JDK as opposed to the JRE is really needed, as java is needed to compile the web pages). As you can see the welcome page contains a few messages and links relating to GeoServer, and then also displays the Title and Abstract sections of the WMS and WFS Capabilities documents. When you edit these the changes will be reflected in the welcome page, so that it is a welcome to your GeoServer instance, with links to the Capabilities documents. It also contains links to the three main GeoServer sections. Demo is the only public section, it contains a nice page to make WMS and WFS requests against GeoServer, with a number of samples. Admin and Config both require youto login. Admin is still more at the idea stage, meant to administer arunning GeoServer. Config contains the bulk of the web admin tool, it is where all the configuration of GeoServer takes place.

Logging In

So that not everyone can come in and modify the configuration ofGeoServer we require a log-in to access the Admin and Config sections. Attempting to click on either from the start page will take you to the log-in page if you are not already logged in, or you can click on the login link in upper right corner. This should take you to the log-in page.

At this point there is only one username and password for the application. In the future we hope to have multiple roles and profiles, so that different users can have different levels of access. This would include administration of GeoServer, but ideally would also extend towards access and transactional capabilities on layers. Your Capabilities documents would be geared to the profile of the user accessing the application, if they were allowed to see the layer, and if they were allowed to modify it. The default password of a new GeoServerinstance is

username: admin
password: geoserver

We highly recommend changing the password, so access to the administration of GeoServer is not open to all.

Changing the Password

In Geoserver 1.6.x some changes have been made to the security system that are not yet reflected in the web administration tool.   If you are using Geoserver 1.6.x, look further down on the page.  For an earlier version see the immediately following section below.

Geoserver 1.5.x and Earlier 

To change the password go to the Config section. You will then be able to select the Server section, and from there the Password section. Enter your new user name and password, and then save.

Saving your changes

The GeoServer admin tool is built so that you can 'try out' your changes. You will notice three buttons on the left side whenever you are in the configuration sections of the application. The general mode of working is to hit 'Apply' after you have made the changes you would like. Do remember to hit the submit button before you hit 'apply' or the changes will not go through.

This applies the changes to the running GeoServer application, so that you can then do your normal WFS and WMS access to 'try out' the changes, to see if everything is configured correctly. But after an apply these changes have not yet been 'committed'. If you are to restart GeoServer then the changes will be lost. So if you are happy with your changes then you should hit the 'Save' button:

This will save the current configuration as XML files that GeoServer will read the next time it starts up. If you are not happy with your changes then hitting the 'Load' button will discard the changes you have made and revert GeoServer to the state it was in when you last hit 'Save' (or last started up, if no changes have been saved). Note that the current state of saves can be ascertained by looking at the left hand tool menu. If there are changes that have been submitted, but not applied, then the Configuration line will have a star by it. Once Apply is hit then GeoServer will have a star by it, indicating that there are applied changes that have not been saved. Note that both can easily be starred, if you have applied some changes and only submitted others. The date and time for each displays the last time they were modified. One last thing to mention, the status bars all indicate the amount of successfully loaded DataStores. Just in case you were wondering. We admit this is not all that useful, but hey, it looks kinda cool, no?

Geoserver 1.6.x

To configure user accounts, you must edit the file $GEOSERVER_DATA_DIR/security/users.properties.  This is a standard Java properties file, which means that it is a list of values in the format NAME=VALUE.  In this case, the NAME is a user account and the VALUE is a comma-separated list of values describing the user.  The first value is the user's password, and the rest are roles the user has.  At the moment, only the ROLE_ADMINISTRATOR role is recognized by Geoserver.

 For example, the default user (username:admin and password:geoserver) is defined by the line:

admin=geoserver,ROLE_ADMINISTRATOR

 Any user with the ROLE_ADMINISTRATOR role is able to log in to the administration interface, which means that you can create several user accounts if you like.  To have multiple users, simply define each one on his or her own line in the configuration file, like so:

joe=joespassword,ROLE_ADMINISTRATOR
susan=susanspassword,ROLE_ADMINISTRATOR
mike=mikespassword,ROLE_ADMINISTRATOR

 

Changes to this file will be automatically detected by Geoserver; no restart is necessary for the new user credentials to take effect.  Users who are logged in before the changes are made will continue to be able to make changes, however. 

Admin Page

The Administration Page is still more of a place holder for future ideas. The main useful functionality it offers at the moment is to release locks that may have gone stale. It also provides information on the JVM version and if JAI is installed. The free memory tool works more or less, but it reports very confusing numbers. The admin page in the future will likely be used to administer user roles and access permissions, but there is much work to be done before we get there.

Config

To get to the main Config page hit the 'Config' button from the welcome page:

From the main Config page there are four options. In general we recommend working through configuration from top to bottom, though you can work in most any order. If you are making a production instance of GeoServer it is very important to fill out all fields. If you are just evaluating GeoServer, wanting to try out your own data, then you can just focus on the 2 Data Configuration section (just DataStore Configu and 4 FeatureType Config if you want to get very minimal). Though the Server Configuration section should also be useful, especially if you need to debug.

  1. Server Configuration
  2. WMS Configuration
  3. WFS Configuration
  4. WCS Configuration
  5. 2 Data Configuration
    1. 1 Namespace Config
    2. 2 DataStore Config
    3. 3 Style Config
    4. 4 FeatureType Config
    5. CoverageStore Config
    6. 6 Coverage Config

Validation

GeoServer 1.3 includes the innovative Validation capabilities, completed by Refractions Research, which gratefully acknowledges the GeoConnections Secretariat for providing matching funds for the development via the GeoInnovations program. It provides a mechanism for ensuring that features edited via GeoServer are spatially clean before allowing them to be inserted into the spatial backend databases. If you are working using GeoServer to its full WFS-T transactional capabilities we strongly recommend that you consider defining a few validation tests. These can be easily defined to ensure simple things like no 0 length geometries, and no dangling lines. But it can also express more complex tests, like ensuring that no streets overlap with defined houses, and that the street name is defined in a Gazetteer.

The Validation configuration is accessed in the WFS section. For 1.3 we don't have time to port and improve the validation guide, so for now just refer to the document created by Refractions, found

If a volunteer wanted to take on the task of making a real validation guide and tutorial, it would be hugely appreciated, as there are some very powerful features there, that no one makes use of since they aren't documented. Indeed uDig 1.1 is starting to use some of the same code, which should hopefully make it easier to define test suites and share between the two. There is also information at: http://vwfs.refractions.net


config.jpg (image/jpeg)
Document generated by Confluence on Jan 16, 2008 23:27